package org.ricks.common.conf;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

/**
 * @author chenwei
 * @Title:
 * @Package
 * @Description:
 * @date 2021/3/1811:38
 */
@ConfProperties(prefix = "html.")
public class ThymeleafConfig {

    private static Charset DEFAULT_ENCODING = StandardCharsets.UTF_8;

    public static String DEFAULT_PREFIX = "classpath:/templates/";

    public static String DEFAULT_SUFFIX = ".html";

    private String prefix = DEFAULT_PREFIX;

    private String suffix = DEFAULT_SUFFIX;

    private String mode = "HTML";

    private Charset encoding = DEFAULT_ENCODING;

    public static Charset getDefaultEncoding() {
        return DEFAULT_ENCODING;
    }

    public static void setDefaultEncoding(Charset defaultEncoding) {
        DEFAULT_ENCODING = defaultEncoding;
    }

    public static String getDefaultPrefix() {
        return DEFAULT_PREFIX;
    }

    public static void setDefaultPrefix(String defaultPrefix) {
        DEFAULT_PREFIX = defaultPrefix;
    }

    public static String getDefaultSuffix() {
        return DEFAULT_SUFFIX;
    }

    public static void setDefaultSuffix(String defaultSuffix) {
        DEFAULT_SUFFIX = defaultSuffix;
    }

    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }

    public Charset getEncoding() {
        return encoding;
    }

    public void setEncoding(Charset encoding) {
        this.encoding = encoding;
    }
}
